package cn.sciento.farm.devicemanager.api.jsonrpc;

import cn.sciento.farm.devicemanager.dao.entity.DevCollection;
import cn.sciento.farm.devicemanager.dao.model.HistoryGetForm;
import cn.sciento.farm.devicemanager.dao.model.ResponseMessage;
import com.googlecode.jsonrpc4j.JsonRpcMethod;
import com.googlecode.jsonrpc4j.JsonRpcService;

/**
 * 采集数据
 */
@JsonRpcService("rpc/hardware.collection")
public interface CollectionJsonApi {


    ResponseMessage update(DevCollection collection);

    ResponseMessage get(Long id);

    ResponseMessage delete(Long id);

    ResponseMessage list(String eui, Integer landId);

    @JsonRpcMethod("get_multi_history")
    ResponseMessage getMultiHistory(HistoryGetForm historyGetForm);

    @JsonRpcMethod("get_by_area_id")
    ResponseMessage getByAreaId(Integer areaId);

    @JsonRpcMethod("list_history")
    ResponseMessage listHistory(Long collectionId, Long time);

    // 添加统计
    @JsonRpcMethod("get_history")
    ResponseMessage getHistory(HistoryGetForm historyGetForm);

    // 用于溯源
    @JsonRpcMethod("get_month_history")
    ResponseMessage getMonthHistory(HistoryGetForm historyGetForm);

}
